package com.example.project_board.mapper;


import com.example.project_board.model.Suggestion;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SuggestionMapper {
    @Select("select userid from user where userid = #{userid}")
    String confirmUser(String userid);
    @Insert("insert into suggestion(userid,talk) values (#{userid},#{talk})")
    void insertSuggestion(Suggestion suggestion);
    @Select("select * from suggestion")
    List<Suggestion> selectSuggestion();
    @Delete("delete from suggestion where talk = #{talk}")
    void deletesug(String talk);
}
